.vt-instr-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.vt-instr-head { flex: 1 1 260px; min-width: 0; }
.vt-instr-tools { display: flex; align-items: stretch; gap: 8px; flex-shrink: 0; margin-left: auto; }

.vt-instr-full { display: inline-flex; align-items: center; justify-content: center; width: 48px; padding: 0; border-radius: 12px; background: var(--vt-surface-2); border: 1px solid var(--vt-border); color: var(--vt-text-soft); cursor: pointer; }
.vt-instr-full:hover { color: var(--vt-text); background: var(--vt-surface); }
.vt-instr-full svg { width: 18px; height: 18px; }

.vt-instr-seg { display: inline-flex; flex-shrink: 0; padding: 4px; border-radius: 12px; background: var(--vt-surface-2); border: 1px solid var(--vt-border); }
.vt-instr-seg button { min-height: 38px; padding: 0 16px; border-radius: 9px; border: 0; background: transparent; color: var(--vt-text-soft); font-weight: 500; font-size: .9rem; cursor: pointer; }
.vt-instr-seg button[aria-pressed="true"] { background: var(--vt-surface); color: var(--vt-text); font-weight: 600; box-shadow: var(--vt-shadow); }

.vt-instr-sections { display: flex; flex-direction: column; gap: 26px; }
.vt-instr-section { display: flex; flex-direction: column; gap: 10px; }
.vt-instr-sec-head { display: flex; align-items: center; gap: 12px; }
.vt-instr-num { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; background: var(--vt-accent-soft); color: var(--vt-accent); font-size: .82rem; font-weight: 700; }
.vt-instr-sec-title { flex: 1; margin: 0; font-size: 1rem; font-weight: 600; }

.vt-instr-card { padding: 16px 18px; border-radius: 12px; background: var(--vt-surface-2); border: 1px solid var(--vt-border-soft); }
.vt-instr-card:hover { border-color: var(--vt-border); }
.vt-instr-card-view { display: flex; gap: 12px; align-items: flex-start; }
.vt-instr-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; line-height: 1.65; }
.vt-instr-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.vt-instr-item { display: flex; gap: 10px; align-items: flex-start; }
.vt-instr-item .vt-instr-text { flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.vt-instr-mark { flex-shrink: 0; width: 6px; height: 6px; margin-top: .68em; border-radius: 50%; background: var(--vt-text-mute); }
.vt-instr-mark.num { width: auto; height: auto; margin-top: 0; border-radius: 0; background: none; color: var(--vt-text-mute); font-variant-numeric: tabular-nums; }

.vt-instr-chip { display: inline-block; padding: 0 8px; margin: 0 1px; border-radius: 999px; background: var(--vt-accent-soft); border: 1px solid var(--vt-accent-ring); color: var(--vt-accent); font-weight: 500; font-size: .92em; line-height: 1.5; white-space: nowrap; }
.vt-instr-chip.field { border-radius: 6px; font-family: var(--bs-font-monospace); font-size: .8em; }

.vt-instr-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--vt-text-mute); cursor: pointer; }
.vt-instr-icon:hover { background: var(--vt-surface); color: var(--vt-text); }
.vt-instr-icon svg { width: 16px; height: 16px; }
.vt-instr-icon.sm { width: 26px; height: 26px; }
.vt-instr-icon.del:hover { background: var(--vt-danger-soft); color: var(--vt-danger); }

.vt-instr-acts, .vt-instr-iacts { display: inline-flex; flex-shrink: 0; gap: 2px; opacity: 0; transition: opacity .15s; }
.vt-instr-card:hover .vt-instr-acts, .vt-instr-card:focus-within .vt-instr-acts,
.vt-instr-item:hover .vt-instr-iacts, .vt-instr-item:focus-within .vt-instr-iacts { opacity: 1; }

.vt-instr-undo { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border-radius: 10px; border: 1px dashed var(--vt-border); color: var(--vt-text-soft); font-size: .88rem; }
.vt-instr-undo-btn { padding: 0; border: 0; background: transparent; color: var(--vt-accent); font-weight: 600; cursor: pointer; }
.vt-instr-undo-btn:hover { text-decoration: underline; }

.vt-instr-editor { display: flex; flex-direction: column; gap: 10px; }
.vt-instr-label { font-size: .82rem; color: var(--vt-text-soft); }
.vt-instr-field { line-height: 1.6; resize: vertical; }
.vt-instr-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.vt-instr-inline { display: flex; gap: 8px; align-items: center; }

.vt-instr-soft { min-height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--vt-accent); font-weight: 500; font-size: .88rem; cursor: pointer; }
.vt-instr-soft:hover { background: var(--vt-accent-soft); }
.vt-instr-newsec { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; border-radius: 12px; border: 1.5px dashed var(--vt-border); background: transparent; color: var(--vt-text-soft); font-weight: 500; cursor: pointer; }
.vt-instr-newsec:hover { border-color: var(--vt-accent-ring); color: var(--vt-accent); }
.vt-instr-newsec svg { width: 18px; height: 18px; }

.vt-instr-plain { display: flex; flex-direction: column; gap: 8px; }

.form-control.vt-instr-raw { min-height: calc(30lh + 42px); font-family: var(--bs-font-monospace); font-size: .86rem; line-height: 1.8; padding: 20px 24px; resize: vertical; }
.vt-instr-counter { align-self: flex-end; font-size: .76rem; color: var(--vt-text-mute); }