/* Вкладки внутри «Допусков формы»; основная навигация не меняется. */
#pageRoughness #rghFormtolSubnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-block-end: 12px;
}
#pageRoughness #rghFormtolSubnav .fc-formtol-subtab {
  padding: 7px 11px;
  min-width: 0;
  white-space: normal;
}
#pageRoughness #rghFormtolSubnav .fc-formtol-subtab[aria-selected="true"] {
  background: var(--fc-accent, #365c76);
  border-color: var(--fc-accent-strong, #28465b);
  color: #fff;
}
#pageRoughness #rghFormtolSubnav .fc-formtol-subtab:focus-visible {
  outline: 2px solid var(--fc-accent, #365c76);
  outline-offset: 2px;
}
#pageRoughness :is(.fc-formtol-subpanel, #rghFormtolPositionHost, #rghFormtolSlotsHost) { min-width: 0; }
#pageRoughness .fc-formtol-subpanel[hidden] { display: none !important; }

:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) .fc-pos { min-width: 0; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) [data-pos-view-button]:focus-visible { outline: 2px solid #0b608f; outline-offset: 3px; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) .fc-pos fieldset { margin: 11px 0; padding: 10px; border: 1px solid #d8e2eb; border-radius: 7px; min-width: 0; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) .fc-pos legend { padding: 0 5px; font-weight: 600; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) .fc-pos-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 3px; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) .fc-pos-fields .fld { min-width: 0; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) .fc-pos-point-table { overflow-x: auto; margin-top: 6px; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) .fc-pos-point-table input { min-width: 6ch; width: 100%; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) .fc-pos-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) .fc-pos-preview-controls .fld { flex: 0 1 auto; min-width: 0; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) [data-pos-view-button][aria-pressed="true"] { outline: 2px solid #0b608f; outline-offset: -2px; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) :is([data-pos-errors], [data-slot-status]) { color: #874218; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) [data-pos-errors] ul { margin: 4px 0 6px; padding-inline-start: 22px; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) :is([data-pos-output], [data-slot-drawing]) { overflow-x: auto; max-width: 100%; min-width: 0; border: 1px solid #d8e2eb; border-radius: 7px; background: #fff; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) [data-pos-output] > svg { display: block; width: 100%; height: auto; min-width: 580px; max-width: 1080px; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) [data-pos-output] > svg[data-pos-svg="frame"] { width: auto; min-width: 260px; max-width: 100%; }
:is(#rghFormtolPositionHost, #rghFormtolSlotsHost) [hidden] { display: none !important; }
@media (max-width: 760px) {
  :is(#rghFormtolPositionHost, #rghFormtolSlotsHost) .fc-pos-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 410px) {
  :is(#rghFormtolPositionHost, #rghFormtolSlotsHost) .fc-pos-fields { grid-template-columns: minmax(0,1fr); }
}
