.vde-protocol-page { display:grid; gap:.65rem; min-width:0; }
.vde-protocol-page > * { min-width:0; }
#vdeProtocolForm { min-width:0; max-width:100%; }
.vde-protocol-page > header { display:block; position:static; height:auto; min-height:0; padding:12px; }
.vde-protocol-page > nav { position:sticky; top:115px; z-index:10; padding:6px; border:1px solid var(--line,#d4dadd); border-radius:8px; background:var(--surface,#fff); }
.vde-protocol-page header p { display:block; margin:.3rem 0 0; }
.vde-protocol-page h2 { margin:0; font-size:20px; }
.vde-actions { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.vde-actions button { white-space:normal; max-width:100%; padding:8px 11px; min-height:36px; }
.vde-fields { border:0; min-width:0; padding:0; margin:0; }
.vde-section { padding:12px; margin:0 0 .65rem; min-width:0; }
.vde-section h3 { margin:0 0 .65rem; font-size:15px; }
.vde-field-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 12px; }
.vde-protocol-page label { display:grid; gap:4px; margin:0; min-width:0; font-size:12px; line-height:1.3; }
.vde-protocol-page .vde-field-grid :is(input,select,textarea) {
  width:100%; max-width:100%; min-width:0; box-sizing:border-box;
  margin:0; padding:7px 8px; min-height:35px; font-size:13px; line-height:1.3;
}
.vde-protocol-page .vde-field-grid textarea { min-height:64px; resize:vertical; }
.vde-wide-field { grid-column:1/-1; }
.vde-protocol-page .vde-checkbox { display:flex; align-items:flex-start; gap:.5rem; padding:4px 0; }
.vde-protocol-page .vde-checkbox input[type=checkbox] { flex:none; width:1.15rem; height:1.15rem; min-height:0; margin:.1rem 0 0; padding:0; }
.vde-checkbox span { overflow-wrap:anywhere; }
.vde-section summary { cursor:pointer; font-weight:700; }
.vde-section[open] summary { margin-bottom:.65rem; }
.vde-form-section { min-width:0; scroll-margin-top:175px; }
.vde-form-section:focus { outline:none; }
.vde-measurement-wrap { overflow:auto; max-height:580px; border:1px solid var(--line,#d4dadd); border-radius:6px; }
.vde-measurement-table { border-collapse:separate; border-spacing:0; width:100%; min-width:1160px; table-layout:fixed; }
.vde-measurement-table th,.vde-measurement-table td { border:0; border-right:1px solid var(--line,#d4dadd); border-bottom:1px solid var(--line,#d4dadd); padding:0; text-align:left; }
.vde-measurement-table th { overflow-wrap:anywhere; }
.vde-measurement-table thead th { background:var(--surface-soft,#f1f4f5); color:var(--ink,#27353d); padding:6px; font-size:11px; line-height:1.25; vertical-align:middle; }
.vde-measurement-table thead { position:sticky; top:0; z-index:3; }
.vde-measurement-table thead tr:first-child th { text-align:center; font-size:12px; }
.vde-measurement-table td { background:var(--surface,#fff); }
.vde-measurement-table tbody td:first-child { position:sticky; left:0; z-index:2; background:var(--surface-soft,#f1f4f5); }
.vde-measurement-table .vde-cell-field { display:block; position:relative; }
.vde-cell-field .vde-field-title { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.vde-protocol-page .vde-measurement-table input { display:block; width:100%; min-width:0; height:35px; min-height:35px; box-sizing:border-box; padding:6px; margin:0; border:0; border-radius:0; background:transparent; font-size:13px; line-height:1.3; }
.vde-measurement-table input:focus { outline:2px solid var(--orange,#f1c536); outline-offset:-2px; }
.vde-measurement-hint { margin:6px 0 0; }
.vde-signatures { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.vde-signature { min-width:0; }
.vde-signature h4 { margin:0 0 .4rem; }
.vde-signature canvas { display:block; width:100%; height:120px; background:#fff; border:1px solid #bac3c7; border-radius:8px; touch-action:none; }
.vde-signature button { margin-top:.35rem; }
@media(min-width:900px) {
  .vde-measurement-table tbody td:nth-child(2) { position:sticky; left:58px; z-index:2; background:var(--surface,#fff); }
}
@media(max-width:640px) {
  .vde-field-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .vde-protocol-page .vde-field-grid :is(input,select,textarea),
  .vde-protocol-page .vde-measurement-table input { font-size:16px; min-height:38px; }
  .vde-protocol-page label { font-size:11px; }
  .vde-protocol-page header { padding:12px; }
  .vde-protocol-page h2 { font-size:18px; }
  .vde-protocol-page > nav { top:102px; }
  .vde-form-section { scroll-margin-top:240px; }
  .vde-section { padding:10px; }
  .vde-section h3 { font-size:14px; }
  .vde-actions button { min-height:38px; font-size:12px; }
  .vde-signatures { grid-template-columns:minmax(0,1fr); }
  .vde-measurement-wrap { max-height:450px; }
}
